from django.urls import path
from django.urls import re_path
from . import views
from django.conf.urls.static import static
from django.conf import settings

urlpatterns = [

    path('UserView/', views.UserView.as_view()),  # 用户修改
    path('UserFreq/', views.UserFreq.as_view()),  # 用户进行修改访问量
    path('UserLogin/', views.wx_login.as_view()),  # 正常小程序登录
    path('UserTest/', views.LoginDemo.as_view()),  # test

    path('ManagerLogin/', views.ManagerLogin.as_view()),
    path('ManagerDetail/', views.ManagerDetail.as_view()),
    path('ManagerAdd/', views.ManagerAdd.as_view()),  # 超级管理员增加普通管理员

    path('SuggestionAll/', views.SuggestionAll.as_view()),  # 管理获取所有投诉列表
    re_path(r'SuggestionListDetail/(?P<pk>\d+)/', views.SuggestionListDetail.as_view()),  # 管理员获取某一列表
    path('SuggestionUser/', views.SuggestionUser.as_view()),  # 用户建议表单上传路径
    path('SuggestionUserDetail/', views.SuggestionUserDetail.as_view()),  # 用户建议表查询路径
    re_path(r'SuggestionUserWhich/(?P<pk>\d+)/', views.SuggestionWhich.as_view()),  # 用户查询提交的某个表
    re_path(r'SuggestionFeedback/(?P<pk>\d+)/', views.SuggestionWhich.as_view()),  # 用户评价途径
    path('SuggestionTreat/', views.SuggestionTreat.as_view()),  # 获取回访表
    re_path(r'SuggestionTreatWhich/(?P<pk>\d+)/', views.SuggestionTreatWhich.as_view()),  # 获取某个回访表

    path('UserAllDetail/', views.UserDetailAll.as_view()),  # 用户所有表单表查询路径
    path('ComplaintHistory/', views.ComplaintHistory.as_view()),  # 历史记录待讨论
    path('SuggestionHistory/', views.SuggestionHistory.as_view()),
    re_path(r'ComplaintHistoryWhich/(?P<pk>\d+)/', views.ComplaintHistoryWhich.as_view()),
    re_path(r'SuggestionHistoryWhich/(?P<pk>\d+)/', views.SuggestionHistoryWhich.as_view()),

    path('ComplaintAll/', views.ComplaintAll.as_view()),  # 管理获取所有投诉列表
    re_path(r'ComplaintListDetail/(?P<pk>\d+)/', views.ComplaintListDetail.as_view()),  # 管理员获取某一列表
    path('ComplaintUser/', views.ComplaintUser.as_view()),  # 用户投诉表单上传路径
    path('ComplaintUserDetail/', views.ComplaintUserDetail.as_view()),  # 用户投诉表查询路径
    re_path(r'ComplaintUserWhich/(?P<pk>\d+)/', views.ComplaintWhich.as_view()),  # 用户查询提交的某个表
    re_path(r'ComplaintFeedback/(?P<pk>\d+)/', views.ComplaintWhich.as_view()),  # 用户评价途径
    path('ComplaintTreat/', views.ComplaintTreat.as_view()),  # 获取回访表  ?????????
    re_path(r'ComplaintTreatWhich/(?P<pk>\d+)/', views.ComplaintTreatWhich.as_view()),  # 获取某个回访表

    path('LimitFinal/', views.LimitFinal.as_view()),

    path('Warn/', views.WarnView.as_view()),
    path('WarnUser/', views.WarnViewUser.as_view()),

    path('Hotline/', views.HotlineView.as_view()),
    path('HotlineUser/', views.HotlineUser.as_view()),  # 用户
    re_path(r'HotlineDetail/(?P<pk>\d+)/', views.HotlineDetailView.as_view()),

    path('Cover/', views.CoverView.as_view()),
    re_path(r'CoverDetail/(?P<pk>\d+)/', views.CoverDetailView.as_view()),

    path('Frequency/', views.FrequencyView.as_view()),

    path('GetExcelNew/', views.GetExcelNew.as_view()),

    path('Background/', views.BackgroundView.as_view()),

    path('CountSum/', views.CountSumView.as_view()),

]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
